namespace StartForm
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }

    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.None;//设置启动窗体为无标题栏窗体
            this.BackgroundImage = Image.FromFile("start.jpg");//设置启动窗体的背景图片
            this.BackgroundImageLayout = ImageLayout.Stretch;//设置图片自动适应窗体大小
            this.timer1.Start();//启动计时器
            this.timer1.Interval = 10000;//设置启动窗体停留时间
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            this.Close();//关闭启动窗体
        }

        private void Form2_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.timer1.Stop();//关闭计时器
        }
    }
}
